package org.baygo.view.api.listener.mycomponent;

import java.awt.Color;

import javax.swing.JButton;

public class MyButton extends JButton{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private MyButton nextButton;

	public MyButton(){
		this.setBackground(Color.red);
	}

	public MyButton(String title){
		super(title);
	}

	public MyButton getNextButton() {
		return nextButton;
	}

	public void setNextButton(MyButton nextButton) {
		this.nextButton = nextButton;
	}

	public MyButton turnGreen(){
		this.setVisible(true);
		this.setBackground(Color.green);
		return this;
	}

	public MyButton turnCyan(){
		this.setVisible(true);
		this.setBackground(Color.cyan);
		return this;
	}

	public MyButton turnGray(){
		this.setVisible(true);
		this.setBackground(Color.gray);
		return this;
	}
	
	public MyButton turnRed(){
		this.setVisible(true);
		this.setBackground(Color.red);
		return this;
	}

	public MyButton setInvisible(){
		this.setVisible(false);
		this.setBackground(Color.red);
		return this;
	}

	public boolean isRed(){
		return this.getBackground().equals(Color.red);
	}
}